Network infrastructure devices classify traffic based on a variety of protocol header fields to determine a packet's source, destination, protocol type, application type, and so forth. Such packet classification is used by network infrastructure devices such as routers, firewalls, and gateways. A packet classifier categorizes packets based on protocol header fields and determines a set of packet filters to apply to the packet.